using System;
using bdddoc.core;
using jpboodhoo.bdd.contexts;
using jpboodhoo.bdd.mbunit;
using jpboodhoo.bdd.mbunit.standard.observations;
using resharperupdate.core.services;
using resharperupdate.core.services.impl;

namespace resharperupdate.core.tests
{
    public class RegistryLookupSpecs
    {
        [Concern(typeof(RegistryLookup))]
        public abstract class concerns : observations_for_a_sut_with_a_contract<IRegistryLookup, RegistryLookup>
        {
            
        }

        public class when_finding_the_installed_version_number_in_registry : concerns
        {
            static string version_pattern = "5[.]0[.][0-9]*[.][0-9]*";
            static string result;
            static string expected;
            
            because b = () => result = sut.version();
            
            it should_find_the_version = () => { 
                Console.WriteLine(result); 
                result.should_match(version_pattern);};
        }
    }
}